how to cast double to int in java